<%@ page import="gdepot.Orders" %>



<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'receiverName', 'error')} required">
	<label for="receiverName">
		<g:message code="orders.receiverName.label" default="Receiver Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="receiverName" maxlength="10" required="" value="${ordersInstance?.receiverName}"/>

</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'phone', 'error')} required">
	<label for="phone">
		<g:message code="orders.phone.label" default="Phone" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="phone" pattern="${ordersInstance.constraints.phone.matches}" required="" value="${ordersInstance?.phone}"/>

</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'address', 'error')} required">
	<label for="address">
		<g:message code="orders.address.label" default="Address" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="address" maxlength="200" required="" value="${ordersInstance?.address}"/>

</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'price', 'error')} required">
	<label for="price">
		<g:message code="orders.price.label" default="Price" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="price" value="${fieldValue(bean: ordersInstance, field: 'price')}" required=""/>

</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'shipDate', 'error')} ">
	<label for="shipDate">
		<g:message code="orders.shipDate.label" default="Ship Date" />
		
	</label>
	<g:datePicker name="shipDate" precision="day"  value="${ordersInstance?.shipDate}" default="none" noSelection="['': '']" />

</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'accountBank', 'error')} ">
	<label for="accountBank">
		<g:message code="orders.accountBank.label" default="Account Bank" />
		
	</label>
	<g:select id="accountBank" name="accountBank.id" from="${gdepot.AccountBank.list()}" optionKey="id" value="${ordersInstance?.accountBank?.id}" class="many-to-one" noSelection="['null': '']"/>

</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'modifiedDate', 'error')} ">
	<label for="modifiedDate">
		<g:message code="orders.modifiedDate.label" default="Modified Date" />
		
	</label>
	<g:datePicker name="modifiedDate" precision="day"  value="${ordersInstance?.modifiedDate}" default="none" noSelection="['': '']" />

</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'cart', 'error')} required">
	<label for="cart">
		<g:message code="orders.cart.label" default="Cart" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="cart" name="cart.id" from="${gdepot.Cart.list()}" optionKey="id" required="" value="${ordersInstance?.cart?.id}" class="many-to-one"/>

</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'orderDate', 'error')} required">
	<label for="orderDate">
		<g:message code="orders.orderDate.label" default="Order Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="orderDate" precision="day"  value="${ordersInstance?.orderDate}"  />

</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'status', 'error')} required">
	<label for="status">
		<g:message code="orders.status.label" default="Status" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="status" from="${gdepot.OrderStatus?.values()}" keys="${gdepot.OrderStatus.values()*.name()}" required="" value="${ordersInstance?.status?.name()}" />

</div>

<div class="fieldcontain ${hasErrors(bean: ordersInstance, field: 'user', 'error')} required">
	<label for="user">
		<g:message code="orders.user.label" default="User" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="user" name="user.id" from="${gdepot.Users.list()}" optionKey="id" required="" value="${ordersInstance?.user?.id}" class="many-to-one"/>

</div>

